<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="expires" content="0">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta charset="utf-8"/>
    <link rel="shortcut icon" type="image/x-icon" href="../../../images/jsmile.ico"/>
    <title>更新用户信息</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_763780_tdovyxg8qq9.css">
    <link rel="stylesheet" href="../../../libs/vue/theme-chalk/elementui.css">
    <link rel="stylesheet" href="../../../css/index.css">
    <script src="../../../libs/vue/vue.js"></script>
    <script src="../../../libs/jquery/jquery.mini.js"></script>
    <script src="../../../libs/vue/elementui.js"></script>
    <script src="../../../libs/layer/layer.js"></script>
    <script src="../../../javascript/kit/jsmile.js"></script>
    <script src="../../../javascript/kit/vue-ext.js"></script>
</head>
<body>
<div id="app">
    <el-form ref="user" :model="user" :rules="userRules"  label-width="100px" style="padding:20px;">
        <el-row >
            <el-col :span="10">
                <el-form-item label="用户名" prop="userName">
                    <el-input v-model="user.userName" :disabled="true"></el-input>
                </el-form-item>
            </el-col>
            <el-col :span="10" :offset="1">
                <el-form-item label="用户姓名" prop="realName">
                    <el-input v-model="user.realName"></el-input>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="10">
                <el-form-item label="邮箱" prop="email">
                    <el-input v-model="user.email"></el-input>
                </el-form-item>
            </el-col>
            <el-col :span="10" :offset="1">
                <el-form-item label="电话" prop="phone">
                    <el-input v-model="user.phone"></el-input>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="10">
                <el-form-item label="部门" prop="deptId">
                    <el-cascader style="width: 100%;"  placeholder="请选择部门"
                                 :options="dicts.depts"
                                 v-model="user.deptId">
                    </el-cascader>
                </el-form-item>
            </el-col>
            <el-col :span="10" :offset="1">
                <el-form-item label="角色" prop="roleId">
                    <el-select v-model="user.roleId"  placeholder="请选择角色" style="width: 100%;">
                        <el-option
                                v-for="item in dicts.roles"
                                :key="item.id"
                                :label="item.roleName"
                                :value="item.id">
                        </el-option>
                    </el-select>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="10">
                <el-form-item label="性别" prop="geneder">
                    <el-radio v-model="user.geneder" label="1">男</el-radio>
                    <el-radio v-model="user.geneder" label="2">女</el-radio>
                </el-form-item>
            </el-col>
            <el-col :span="10" :offset="1">
                <el-form-item label="出生日期" prop="birthday">
                    <el-date-picker style="width: 100%;"
                            v-model="user.birthday"
                            type="date"
                            placeholder="出生日期">
                    </el-date-picker>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="10">
                <el-form-item label="备注" prop="remark">
                    <el-input
                            type="textarea"
                            :rows="2"
                            placeholder="备注"
                            v-model="user.remark">
                    </el-input>
                </el-form-item>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="10">
                <el-form-item>
                    <el-button @click="closeDialog">取消</el-button>
                    <el-button type="primary" @click="updateUser" :disabled="isDisabled">修改账号</el-button>
                </el-form-item>
            </el-col>
        </el-row>
    </el-form>
</div>
<script src="../../../javascript/sys/user/editUser.js"></script>
</body>
</html>